import request from '../utils/request'

/**
 * 查询所有主分类的数据
 * @returns 
 */
export const getCategories = () => request.get('/api/tabs')

/**
 * 根据主分类查询子分类数据
 * 文档接口地址中有{id}这类参数时,将{id}替换成实际的参数值
 */
export const getSubCategories = id => request.get('/api/tab/' + id)